package file;

import java.io.File;

public class ListFilesDemo {
    public static void main(String[] args) {
        File file;

            file = new File("d:/");
            if (!file.isFile()) {
                if (file.isDirectory()) {
                    File[] f = file.listFiles();
                    for (File fi : f) {
                        System.out.println(fi.getName());
                    }

                }
            }

        }

}
